-- GENERATED SPELL FOR [Quetz'lun Worshipper] --


function spell0_28747(pUnit, Event) --@Serpent Form,Self--
pUnit:FullCastSpellOnTarget(54601,pUnit)
pUnit:RegisterEvent('Sorts_28747', 10500, 1)
end

function spell1_28747(pUnit, Event) --@Serpent Strike,n/a--
pUnit:FullCastSpellOnTarget(54594,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28747', 581, 1)
end

function Sorts_28747(pUnit, Event)
local choix_sorts_28747 = math.random(0, 1)
if choix_sorts_28747 == 0 then
pUnit:RegisterEvent('spell0_28747', 1, 1)
end
if choix_sorts_28747 == 1 then
pUnit:RegisterEvent('spell1_28747', 1, 1)
end
end

function mob28747_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28747', math.random(1500, 3000), 1)
end

function mob28747_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28747_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28747_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28747, 1, 'mob28747_Action')
RegisterUnitEvent(28747, 2, 'mob28747_Leave')
RegisterUnitEvent(28747, 3, 'mob28747_Kill')
RegisterUnitEvent(28747, 4, 'mob28747_Die')
